package com.blkbox.javase.thread.ex1;

public class MyThread extends Thread {

	public MyThread(String name) {
		super(name);
	}

	@Override
	public void run() {
		for (int i = 0; i < 5; i++) {
			for (long k = 0; k < 1000000; k++);
			System.out.println(this.getName() + ": " + i);
		}
	}

	public static void main(String[] args) {
		Thread t1 = new MyThread("aaa");
		Thread t2 = new MyThread("bbb");
		t1.start();
		t2.start();
	}
}
